package com.example.cofeed.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.cofeed.R;
import com.example.cofeed.api.APIUrl;
import com.example.cofeed.entity.MessageNotification;

import java.util.List;

public class SystemMessagesAdapter extends BaseQuickAdapter<MessageNotification, BaseViewHolder> {
    public SystemMessagesAdapter() {
        super(R.layout.adapter_system_messages);
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageNotification item) {
        Glide.with(mContext).load(item.icon).into((ImageView) helper.itemView.findViewById(R.id.iv_image));

        helper.setText(R.id.tv_title, item.type);
        helper.setText(R.id.tv_content, item.content);
        helper.setText(R.id.tv_date, item.datetime);


    }
}
